{% extends "bootstrap/base.html" %}

{% block title %}
    {% if title %}
        {{ title }} - Letters On The Cloud！
    {% else %}
        Welcome to Letters On The Cloud！
    {% endif %}
{% endblock %}

{% block navbar %}
    <nav class="navbar navbar-default">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="{{ url_for('index') }}">Letters On The Cloud</a>
            </div>

            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <u1 class="nav navbar-nav">
                    <li><a href="{{ url_for('index') }}">Home</a></li>
                    <li><a href="{{ url_for('notes') }}">Notes</a></li>
{#                    <li><a href="{{ url_for('explore') }}">Explore</a></li>#}
                </u1>

                <u1 class="nav navbar-nav navbar-right">
                    {% if current_user.is_anonymous %}
                        <li><a href="{{ url_for('login') }}">Login</a></li>
                    {% else %}
                        <li><a href="{{ url_for('user',username=current_user.username) }}">Profile</a></li>
                        <li><a href="{{ url_for('logout') }}">Logout</a></li>
                    {% endif %}
                </u1>
            </div>
        </div>
    </nav>
{% endblock %}

{% block content %}

    <div class="container">
        {% with message = get_flashed_messages() %}
            {% if massages %}
                {% for message in messages %}
                    <div class="alert alert-info" role="alert">{{ message }}</div>
                {% endfor %}
            {% endif %}
        {% endwith %}

        {# application content needs to be provided in the app_content block #}
        {% block app_content %}{% endblock %}
    <footer class="page-footer font-small blue" style="margin-top: 50px">
  <!-- Copyright -->
  <div class="footer-copyright text-center py-3">
      Copyright ©2020-2020 <a href="http://127.0.0.1:5000">Notebook V1.0</a>

  </div>
  <!-- Copyright -->
</footer>
    </div>
{% endblock %}
{#<html lang="en">#}
{#<head>#}
{#    {% if title %}#}
{#        <title>{{title}}</title>#}
{#    {% else %}#}
{#        <title>Welcome to 云上札记</title>#}
{#    {% endif %}#}
{#</head>#}
{#<body>#}
{#    <div>#}
{#        云上札记:#}
{#        <a href="{{url_for('index')}}">Home</a>#}
{#        {% if current_user.is_anonymous %}#}
{#        <a href="{{url_for('login')}}">Login</a>#}
{#        {% else %}#}
{#            <a href="{{ url_for('logout') }}" style="display: block;text-align:right;">Logout</a>#}
{#            <a href="{{ url_for('user', username=current_user.username) }}" style="display: block;text-align:right;">Profile</a>#}
{#        {% endif %}#}
{#    </div>#}
{#    <hr>#}
{#    {% with messages = get_flashed_messages()%}#}
{#    {% if messages %}#}
{#    <ul>#}
{#        {% for message in messages%}#}
{#        <li>{{message}}</li>#}
{#        {%endfor%}#}
{#    </ul>#}
{#    {%endif%}#}
{#    {%endwith%}#}
{##}
{#    {% block content %}#}
{#    {% endblock %}#}
{##}
{#</body>#}
{#</html>#}